#include <iostream>
#include <time.h>
using namespace std;
int L[45][45];
int main(){
    srand((unsigned)(time(NULL)));
    cout<<40<<" "<<400<<endl;
    int cnt=0;
    while(cnt<400){
        int x=rand()%40;
        int y=rand()%40;
        if(x!=y&&L[x][y]==0){
            L[x][y]=1;
            L[y][x]=1;
            cnt++;
            cout<<x<<" "<<y<<endl;
        }
    }
    return 0;
}
